package first.demo;

public class Oshu {
    public static void main(String[] args) {
        int[] number={2,5,7,8,9,11,24,6,5,9,41};
        int sum=0;
        int count=0;
        double avg=0.0;
        int[] number2=new int[number.length];
        for(int i=0;i<number.length;i++){
            if(number[i]%2==0) {
                sum+=number[i];
                count++;
                System.out.print(number[i]+" ");
            }
        }
        System.out.println();
        System.out.println("该数组偶数的和："+sum);
        System.out.println("该数组偶数的平均值:"+((double) sum) /count);
    }
}
